package net.xdclass.job;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class MyJobHandler {

    @XxlJob(value = "demoJobHandler", init = "init", destroy = "destory")
    public ReturnT<String> execute(String param) {
        log.info("MyJobHandler execute 任务方法触发成功");

        return ReturnT.SUCCESS;
    }

    private void init() {
        log.info("MyJobHandler init >>>>>>>>");
    }

    private void destory() {
        log.info("MyJobHandler destory >>>>>>>>");
    }


}
